package zxing.activity.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

import io.virtualapp.R;
import io.virtualapp.bean.ServiceItemBean;


public class SuggestListAdapter extends BaseQuickAdapter<ServiceItemBean,BaseViewHolder> {

    public SuggestListAdapter(@Nullable List<ServiceItemBean> data) {
        super(R.layout.su_item_layout,data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ServiceItemBean item) {
        helper.setText(R.id.tv_time,item.getAddtime());
        String temp= "待回复";
        switch (item.getStatus()){
            case 0:
            case 1:
                temp = "待回复";
                break;
            case 2:
                temp = "已回复";
                break;
            case 99:
                temp = "已解决";
                break;
        }

        helper.setText(R.id.tv_state,temp);
        helper.setText(R.id.tv_type,"类型："+item.getType());
        helper.setText(R.id.tv_title,item.getTitle());
        helper.setText(R.id.tv_content,item.getDescribe());



    }
}
